{{define "article_list"}}
    {{template "layout/header"}}
    {{template "layout/left" .Auth}}
    <div class="main-wrapper">
        <section class="blog-list px-3 py-5 p-md-5">
            <div class="container">
                <div class="row" style="width: 1200px;position: relative;left: -200px;" >
                    <div class="col-md-12">
                      <div class="x_panel">
                        <div class="x_title">
                          <div class="clearfix"></div>
                        </div>
                        <div style="position: relative;top: -10px;">
                            <form action="/root/article_search" method="post">
                              搜索：<input type="text" name="title" placeholder="请输入文章标题">
                              <input type="submit"  value="提交">
                            </form>
                          </div>
                          <!-- start project list -->
                          <table class="table table-striped projects">
                            <thead>
                              <tr>
                                <th style="width: 10%">文章编号</th>
                                <th style="width: 10%">标题</th>
                                <th style="width: 10%">作者</th>
                                <th style="width: 30%">简介</th> 
                                <th style="width: 10%">标签</th> 
                                <th style="width: 10%">更新时间</th> 
                                <th style="width: 20%">操作</th>
                              </tr>
                            </thead>  
                         
                            <tbody>
                            {{range $index, $item := .Paginate.Data}} 
                              <tr>
                                <td> {{$item.ID}}</td>
                                <td>
                                  {{$item.Title}}
                                </td>
                                <td>
                                    {{$item.User.Name}}
                                </td>
                                <td>
                                    {{$item.Introduction}}
                                </td>
                                <td>
                                    {{$item.Tags}}
                                </td>   
                                <td>
                                    {{$item.UpdatedAt}}
                                </td>     
                                <td>
                                  <a href="/root/user_delete/{{$item.ID}}" class="btn btn-primary btn-xs">删除 </a>
                                  &nbsp; &nbsp; &nbsp; &nbsp;
                                  <a href="/detail/{{$item.ID}}" class="btn btn-info btn-xs">查看详情 </a>
                                </td>
                              </tr>
                              {{end}}
                            </tbody>
                          </table>
                        </div>
                      </div>
                    </div>
                {{with .Paginate}}
                {{template "layout/pagination" .}}
                {{end}}
            </div>
        </section>
        {{template "layout/section_footer"}}
    </div>
    {{template "layout/footer"}}
{{end}}